Option Strict Off
imports Humans=PHSRAG.Insight21.Humans
imports FormsManagement=PHSRAG.Insight21.FormsManagement

module Script 
sub Main() 
    If intrinsicQuestionnaireAnswer.ExternalId = 0 And intrinsicQuestionnaireAnswer.Name <> FormsManagement.Constants.QuestionnaireAnswerDefaultNames.Drugs Then
	    Dim logItem As New Humans.LogItem(intrinsicCachePolicy)
	    logItem.QuestionnaireVersionId = intrinsicQuestionnaireAnswer.QuestionnaireVersionId
	    logItem.QuestionnaireAnswerId = intrinsicQuestionnaireAnswer.Id
	    logItem.Type = "Drugs / Biologics / Dietary Supplements"
	    logItem.QuestionName = ""
	    logItem.Category = "Drugs / Biologics / Dietary Supplements"
	    logItem.Answer = ""
	    logItem.Description = "Drug form may be corrupt.  Please contact insighthelpdesk@partners.org for assistance"
	    logItem.Completed =False
        intrinsicProtocolProcess.SaveLogItem(logItem)
    End If
End Sub
End Module
